﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

using Sharp.Domain.Model;

namespace Sharp.Domain.CMSBoundedContext.AritcleModule.Aggregates
{
    public class Article : AggregateRoot
    {
        /// <summary>
        /// 标题
        /// </summary>
        [Index, StringLength(150)]
        public string Title { get; set; }
        /// <summary>
        /// 内容
        /// </summary>
        public string Content { get; set; }
        /// <summary>
        /// 是否原创
        /// </summary>
        public bool IsOriginal { get; set; }
        [Index]
        public System.DateTime CheckInTime { get; set; }
        [DefaultValue(""), StringLength(255)]
        public string Url { get; set; }
        public DateTime? EventDay { get; set; }
        public string ComeFrom { get; set; }
        public string Author { get; set; }
        public bool IncludePic { get; set; }
        [StringLength(255)]
        public string PicUrl { get; set; }
        public Guid? GatherId { get; set; }
        [ForeignKey("GatherId")]
        public Gather Gather { get; set; }
    }
}
